﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Jumpton.SFA.Server.BusinessRule.MasterData;
using Jumpton.SFA.Server.BusinessRule.System;
using Jumpton.SFA.Server.Entity;
using Jumpton.SFA.Server.BusinessRule;

public partial class masterdata_Supply_List : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindGrid();
        }
    }

    #region 绑定查询数据
    public void BindGrid()
    {
        GridPager1.DataSource = new SupplyManager().Query(MyStateManager.DomainID, txtKeyword.Text, int.Parse(ddlValid.SelectedValue));
        GridPager1.GridView = gvSupply;
        GridPager1.BindData();
        GridPager1.Visible = gvSupply.Rows.Count > 0;
        

    }
    #endregion

    
    protected void btnQuery_Click(object sender, EventArgs e)
    {
        BindGrid();
    }

    protected void gvSupply_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        gvSupply.PageIndex = e.NewPageIndex;
        BindGrid();
    }
}
